package com.example.communitypro.pojo;

import org.springframework.stereotype.Component;

import java.util.LinkedList;
import java.util.Queue;

@Component("homeMessageQueue")
public class HomeMessageQueue {
    Queue<HomeMessage> homeMessageQueue = new LinkedList<>();

    public HomeMessageQueue() {
    }

    public Queue<HomeMessage> getHomeMessageQueue() {
        return homeMessageQueue;
    }

    public void setHomeMessageQueue(Queue<HomeMessage> homeMessageQueue) {
        this.homeMessageQueue = homeMessageQueue;
    }

    public boolean isFull(){
        if (homeMessageQueue.size() > 6){
            return false;
        }else {
            return true;
        }
    }

}
